"""
Ezfin Client - 金融数据传输客户端
该模块提供了用于金融tick数据序列化和反序列化的工具。
"""
import logging
from .webtransport import WebTransportClient
from .websocket import WebSocketClient
from .eztrade_client import (
    TickData, 
    Order, 
    PyMessage, 
    Authority,
    PriceLevel,
    Direction,
    PositionEffect,
    OrderStatus,
    Operation,
    OrderOperation,
    Position,
    Portfolio,
    BarData,
    Currency,
)
from .utils.logger import get_logger
logger = get_logger("eztrade_client", level=logging.INFO)
try:
    import asyncio
    import uvloop
    asyncio.set_event_loop_policy(uvloop.EventLoopPolicy())
except ImportError:
    logger.warning("uvloop is not installed, using default asyncio event loop.")
    pass

__all__ = [
    "TickData",
    "Order",
    "PyMessage",
    "Currency",
    "Authority",
    "PriceLevel",
    "Direction",
    "PositionEffect",
    "OrderStatus",
    "Operation",
    "OrderOperation",
    "Position",
    "Portfolio",
    "BarData",
    "get_logger",
    "WebTransportClient",
    "WebSocketClient",
]
